#include "kassert.h"
#include "atom.h"
#include "syslog.h"

#ifdef  COM_USE_KASSERT

#if defined(__IAR_SYSTEMS_ICC__)
#pragma diag_suppress=Pe111 // unreachable
#endif
void assert_failed(const char* file, int line, const char *msg)
{
    CRITICAL_STORE;

    CRITICAL_START();
    
    SYSLOG(LOG_EMERG, "assert failed %d,%d,%s", file, line, msg);

    while(1);

    CRITICAL_END();
}

#endif